using UnityEngine;

namespace RStudio.Command
{
    public class ShowVersionCommand : ICommand
    {
        public string Name => "ShowVersion";
        public string Description => "";
        public CommandPermission RequiredPermission => CommandPermission.Normal;
        public string Category => "General";
        public string Usage => "/ShowVersion [参数]";
        
        public string[] ParamArray { get; set; } = System.Array.Empty<string>();

        public bool IsValid(string[] args, out string errorMessage)
        {
            // TODO: 实现参数验证逻辑
            errorMessage = "";
            return true;
        }

        public bool CanExecute(string[] args)
        {
            throw new System.NotImplementedException();
        }

        public bool Execute(string[] args)
        {
            if (!IsValid(args, out string errorMessage))
            {
                Debug.LogError($"参数错误: {errorMessage}");
                return false;
            }
            
            // TODO: 实现命令逻辑
            Debug.Log($"执行命令: {Name} 参数: {string.Join(", ", args)}");
            
            return true;
        }


    }
}